package com.novel.controller.novel;


import com.novel.controller.other.BaseController;
import com.novel.pojo.novel.NovelCategory;
import com.novel.service.NovelCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("novel/category")
public class NovelCategoryController extends BaseController {

    @Autowired
    private NovelCategoryService service;

    /**
     * 查询小说类型信息
     */
    @GetMapping("list")
    public List<NovelCategory> findCategory() {
        return service.findAllCategory();
    }

}
